package mest.dao.LGF.FinancialPurchaseMoney;

import mest.VO.LGF.FinancialPurchaseMoney.account_fileVO;
import mest.VO.LGF.FinancialPurchaseMoney.financial_PurchaseMoneyRecordVO;
import mest.VO.LGF.FinancialPurchaseMoney.financial_PurchaseMoneyVO;
import mest.VO.LGF.FinancialPurchaseMoney.subject_typeVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description
 * @auther Machenike
 * @create 2019-12-19 17:14
 */
public interface IfinancialPurchaseMoneyDao {

    //1.未完成基本查询-数量
    int countNOFinish(@Param("theirDb")String theirDb);

    //2.未完成基本查询-分页
    List<financial_PurchaseMoneyVO> selectAllNOFinish(@Param("theirDb")String theirDb,@Param("index") int index, @Param("pageSize") int pageSize);

    //3.已完成基本查询-数量
    int countFinish(@Param("theirDb")String theirDb);

    //4.已完成基本查询-分页
    List<financial_PurchaseMoneyVO> selectAllFinish(@Param("theirDb")String theirDb,@Param("index") int index,@Param("pageSize") int pageSize);

    //往期记录--分页
    List<financial_PurchaseMoneyRecordVO> selectPastRecord(@Param("theirDb")String theirDb,@Param("fpmId") int ppmId,@Param("index") int index,@Param("pageSize") int pageSize);
    //往期记录--数量
    int selectPastRecordCount();
    //2级弹层账户-分页
    List<account_fileVO> selectAllAccountFile(@Param("theirDb")String theirDb,@Param("index") int index,@Param("pageSize") int pageSize);
    //2级弹层账户-数量
    int countAccountFile();
    //2级弹层科目-分页
    List<subject_typeVO> selectAllSubjectType(@Param("theirDb")String theirDb,@Param("index") int index, @Param("pageSize") int pageSize);
    //2级弹层科目-数量
    int countSubjectType();

    //1级弹层付款提交，添加记录
    int addReocrd(financial_PurchaseMoneyRecordVO fpmrVO) throws Exception;
    //1级弹层付款提交后修改计划已付款金额--采购
    int updatePlanHasBeenMoney(financial_PurchaseMoneyRecordVO fpmrVO) throws Exception;
   //1级弹层付款提交后修改财务已付款金额--财务
    int updateFinancialHasBeenMoney(financial_PurchaseMoneyRecordVO fpmrVO) throws Exception;
    //1级弹层付款提交后修改account_file里面的balance余额数量--财务
    int updateAccountFileBanlanceByACF(financial_PurchaseMoneyRecordVO fpmrVO);
    //收款完毕
    int updateByFPMId(@Param("theirDb")String theirDb,@Param("fpmId") int ppmId,@Param("status")int status) throws Exception;
}
